//
// Created by hsj on 2024-5-15.
// 实现时钟延迟方式
//

#include<iostream>
#include<ctime>
int main(void){
    using namespace std;
    float secs = 20.5f;
    clock_t delay = secs * CLOCKS_PER_SEC;

    clock_t start_time = clock();
    while (clock() - start_time <= delay);
    cout<<"sleep done."<<endl;
    return 0;
}